import { createRouter, createWebHashHistory } from 'vue-router'
import Home from '../views/Home.vue'
import About from '../views/About.vue'
import UploadFile from '../views/UploadFile.vue'
import Form from '../views/Form.vue'
import Statistic from '../views/Statistic.vue'
import Shop from '../views/Shop.vue'
import Temp from '../views/Temp.vue'
import Goods from '../views/Goods.vue'
import Welcome from '../views/Welcome.vue'
import Test from '../views/Test.vue'
import EditAddress from '../views/EditAddress.vue'
import EditClass from '../views/EditClass.vue'
import Help from '../views/Help.vue'

const routes = [
  // { path: '/', name: 'Home', component: Home },
  { path: '/about', name: 'About', component: About },
  { path: '/upload', name: 'UploadFile', component: UploadFile },
  { path: '/form', name: 'Form', component: Form },
  { path: '/statistic', name: 'Statistic', component: Statistic },
  { path: '/home', name: 'Home', component: Home },

  { path: '/shop', name: 'Shop', component: Shop },
  { path: '/temp', name: 'Temp', component: Temp },
  { path: '/goods', name: 'Goods', component: Goods },
  { path: '/', name: 'Welcome', component: Welcome },
  { path: '/:pathMatch(.*)*', redirect: '/' },
  { path: '/test', name: 'Test', component: Test },
  { path: '/editAddress', name: 'EditAddress', component: EditAddress },
  { path: '/editClass', name: 'editClass', component: EditClass },
  { path: '/help', name: 'Help', component: Help }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
